/*
 * This file is Copyright 2002-2006 Loyola University Chicago,
 * Department of Computer Science and the Emerging Technologies Laboratory.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License via
 *    http://www.apache.org/licenses/LICENSE-2.0.
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.citep.business;

import java.math.BigDecimal;

public interface Entry {
	/**
	 * Get the value of the id.  
	 * 
	 * @return The id value
	 */
	public int getId();

	/**
	 * Get the value of the entry.
	 *
	 * @return Amount of the entry.
	 */
	public BigDecimal getAmount();

	/**
	 * Set the value of the entry.
	 *
	 * @param  amount  New amount of the entry.
	 */
	public void setAmount(BigDecimal amount);

	/**
	 * Get get the value of the description.
	 *
	 * @return The description.
	 */
	public String getMemo();

	/**
	 * Set the value of the description.
	 *
	 * @param  description  New description.
	 */
	public void setMemo(String description);

	/**
	 * Get the type of the entry.
	 *
	 * @return Entry type.
	 */
	public EntryTypes getType();

	/**
	 * Set the type of the entry.
	 * This is either 'CREDIT' or 'DEBIT'.
	 * 
	 * @param  entryType  New entry type.
	 */
	public void setType(EntryTypes type);

	/**
	 * Get the parent Account of this Entry.  This is the account
	 * to which the debit or credit of the given value was performed.
	 * 
	 * @return parent Account
	 */
	public Account getAccount();
	public void setAccount(Account account);

	/**
	 * Get the source Account of this Entry.  This is the account
	 * FROM which the debit or credit of the given value was performed.
	 * 
	 * If this entry is part of a SPLIT transaction, this value is null
	 * 
	 * @return parent Account
	 */
	public Account getSource();
	public void setSource(Account account);
	
	public Transaction getTransaction();
}
